<?php

namespace App\Http\Requests\Products;

use App\Http\Requests\ApiRequest;
use App\Models\Extension\Extension;
use App\Models\Layout\LayoutModule;
use App\Models\Layout\Module;
use Illuminate\Validation\Validator;

/**
 * @property string $keyword
 * @property string $limit
 */
class ProductSearchAutoCompleteRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'keyword' => 'required|string|min:1|max:' . self::MAX_STRING,
            'limit' =>  'nullable|int|min:1|max:50',
        ];
    }
}
